package cn.zhangxin.newyear.system.department.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.zhangxin.newyear.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zx
 * @since 2023-01-15
 */
@Data
public class Department extends BaseDomain{

    private static final long serialVersionUID = 1L;

    /**
     * 部门编号
     */
    @Excel(name = "部门编号" ,orderNum = "1", width = 30, isImportField = "true_st")
    private String sn;
    /**
     * 部门名称
     */
    @Excel(name = "部门名称" ,orderNum = "1", width = 30, isImportField = "true_st")
    private String name;
    /**
     * 部门的上级分类层级id
     */
    @Excel(name = "上级部门id" ,orderNum = "1", width = 30, isImportField = "true_st")
    private String dirPath;
    /**
     * 部门状态，0正常，1禁用
     */
    @Excel(name = "部门状态" ,orderNum = "1", replace = { "禁用_0", "正常_1"}, width = 30, isImportField = "true_st")
    private Integer state;
    /**
     * 部门管理员，关联Employee表id
     */
    @Excel(name = "部门管路员" ,orderNum = "1", width = 30, isImportField = "true_st")
    private Long managerId;
    /**
     * 上级部门
     */
    @Excel(name = "上级部门" ,orderNum = "1", width = 30, isImportField = "true_st")
    private Long parentId;
    @Excel(name = "相关店铺" ,orderNum = "1", width = 30, isImportField = "true_st")
    private Long shopId;

    //查询管理员
    private String employee;
    //查询父部门
    private String parentname;
    //无限级树
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList();
}
